package edu.nf.project.services.storeOperation.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import edu.nf.project.entitys.entity.accountsAndPermissions.convention.Users;
import edu.nf.project.entitys.entity.storeOperation.convention.operate.Region;
import edu.nf.project.mappers.storeOperation.convention.RegionMapper;
import edu.nf.project.services.storeOperation.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * 区域Service实现类
 */
@Service
public class RegionServiceImpl implements RegionService {
    @Autowired
    private RegionMapper regionMapper;

    @Override
    public List<Region> getTargetRegionList(Integer[] regionIds) {
        LambdaQueryWrapper<Region> wrapper = new LambdaQueryWrapper<>();
        wrapper.in(Region::getRegionId, Arrays.asList(regionIds));
        return regionMapper.selectList(wrapper);
    }
}
